<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2018/5/16
 * Time: 17:23
 */

namespace app\index\controller;


use think\Controller;

class Test extends Controller
{
    public function __construct()
    {
        //$test="sss";
        //echo($test);
    }

    public function test()
    {
        return view();
    }

    public function test_level($id)
    {
        $A = new Api();
        $get_column = $A->get_menu('columns');
        foreach ($get_column['data'] as $colunm) {
            if ($colunm['id']==$id) $des_col = $colunm;
        }
        $level = get_level($des_col, $get_column['data']);
        dump($level);
    }

    public function test_child($id)
    {
        $A = new Api();
        $get_column = $A->get_menu('columns');

        $child = get_child_columns($id, $get_column['data']);
        dump($child);
        $this->redirect('ArticleDetail/page_more',['column' => $child[0]['id']]);
    }
    public function test2()
    {
        card_info_special_page();
    }
    public function test3($id)
    {
        $A = new Api();
        $get_column = $A->get_menu('columns');
        dump(find_the_dar1($A, $get_column, $id));
    }
}
